/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.business.fee.test.base;

import com.alibaba.fastjson2.JSON;
import com.google.common.collect.Lists;
import info.peigen.hotpot.business.fee.core.domain.FeeContext;
import info.peigen.hotpot.common.core.lang.money.Money;
import info.peigen.hotpot.common.service.base.test.ServiceTestBaseMockConstant;
import info.peigen.hotpot.common.service.base.time.TimeRange;

import java.time.LocalTime;
import java.util.List;

/**
 * <b>(FeeTestBaseMockConstant)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/4/12
 */
@SuppressWarnings("unused")
public interface FeeTestBaseMockConstant extends ServiceTestBaseMockConstant {
    String FEE_ACCOUNT_ALIAS_NAME        = "收费账户-peigen";
    String PROVISIONS_ACCOUNT_ALIAS_NAME = "默认备付金账户-peigen";
    String CUSTOMER_ID                   = "2022091000322888130156";
    String ACCOUNT_ID                    = "2022091000322888130156";
    String PARTNER_ID                    = "20220222222222814090002";
    String STATION_PARTNER_ID            = "202209100032298898020001";
    String FEE_RULE_CONTEXT              = feeRuleContext();

    static String feeRuleContext() {
        TimeRange        firstTimeRange  = TimeRange.builder().startTime(LocalTime.of(00, 00, 00)).endTime(LocalTime.of(8, 0, 0)).build();
        TimeRange        secondTimeRange = TimeRange.builder().startTime(LocalTime.of(8, 00, 00)).endTime(LocalTime.of(00, 00, 00)).build();
        List<FeeContext> contexts        = Lists.newArrayList(FeeContext.builder().timeRange(firstTimeRange).chargeFee(Money.amount("1.0")).build(), FeeContext.builder().timeRange(secondTimeRange).chargeFee(Money.amount("1.3")).build());
        return JSON.toJSONString(contexts);
    }
}